package com.easyweb.session;

import com.easyweb.entity.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("semtlerHome")
public class SemtlerHome extends EntityHome<Semtler> {

	@In(create = true)
	IlceHome ilceHome;

	public void setSemtlerId(BigDecimal id) {
		setId(id);
	}

	public BigDecimal getSemtlerId() {
		return (BigDecimal) getId();
	}

	@Override
	protected Semtler createInstance() {
		Semtler semtler = new Semtler();
		return semtler;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
		Ilce ilce = ilceHome.getDefinedInstance();
		if (ilce != null) {
			getInstance().setIlce(ilce);
		}
	}

	public boolean isWired() {
		return true;
	}

	public Semtler getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

	 

}
